#ifndef __KSMM_REQUEST__
#define __KSMM_REQUEST__

#include "IUtility.h"
#include "IThreadPoolManager.h"
#include "IMakeMarket.h"
#include "IDataConnect.h"
#include "IBaseBusinessOperation.h"
#include "IClient.h"
#include "IIntProCom.h"

class CClientProcessMonitor : public virtual IWork
{
	INIT_CLASS_PRODUCT(CClientProcessMonitor)
public:
	const bool Init(const void * pvdPara, char * pszMsgTxt, int iMsgTxtSize);
	void * Work();

private:
	shared_ptr<IInterProcessCommunication> m_ptrInterProcessCommunication;
	shared_ptr<IStrFun> m_ptrStrFun;
	shared_ptr<IMakeMarket> m_ptrMakeMarket;
};

class CKsmmProcessMonitor : public virtual IWork 
{
INIT_CLASS_PRODUCT(CKsmmProcessMonitor);
public:
	const bool Init(const void * pvdPara, char * pszMsgTxt, int iMsgTxtSize);
	void * Work();
private:
	//void * m_ptrTrdMonProQue;
	shared_ptr<IMakeMarket> m_ptrMakeMarket;
    shared_ptr<IBussinessOperation> m_ptrBussinessOperation;
    shared_ptr<IEmergency> m_ptrEmergency;
	shared_ptr<IStrFun> m_ptrStrFun;
	shared_ptr<ISysFun> m_ptrSysFun;
//	map<string, shared_ptr<IPacket>> m_mpHisResultSet;
	map<string, shared_ptr<IConnect>> m_mpConnect;
	unsigned long long m_ullCurTime;
private:
	IConnect * DataConnect(const char * szConnectId);
    shared_ptr<IKcbpLbmManager> m_ptrKcbpLbmManager;
};

class CKsmmProcessMonitorRequest : public virtual IWork
{
INIT_CLASS_PRODUCT(CKsmmProcessMonitorRequest);
public:
	const bool Init(const void * pvdPara, char * pszMsgTxt, int iMsgTxtSize);
	void * Work();
private:
	shared_ptr<IMakeMarket> m_ptrMakeMarket;
    shared_ptr<IBussinessOperation> m_ptrBussinessOperation;
    shared_ptr<IEmergency> m_ptrEmergency;
	shared_ptr<IStrFun> m_ptrStrFun;

private:
	IConnect * DataConnect(const char * szConnectId);
    shared_ptr<IKcbpLbmManager> m_ptrKcbpLbmManager;
};

#endif//__KSMM_REQUEST__